package cn.gok;

import java.util.Objects;


class Student extends Object{
    private int sid;
    private String sname;
    private String sex;
    private int age;

    public Student(int sid, String sname, String sex, int age) {
        this.sid = sid;
        this.sname = sname;
        this.sex = sex;
        this.age = age;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Student student = (Student) o;
        return sid == student.sid && age == student.age && Objects.equals(sname, student.sname) && Objects.equals(sex, student.sex);
    }

    @Override
    public int hashCode() {
        return Objects.hash(sid, sname);
    }
}
public class Object类 {
    public static void main(String[] args) {

        }
    }

